home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / freetree.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-13  |  390 b   |  24 lines

  1. /*
  2. ** freetree.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include "compress.h"
  11.  
  12. /*
  13. ** Frees the memory in a compression code tree.
  14. */
  15. void freetree(NODE *node)
  16. {
  17.     if(node != NULL) {
  18.         freetree(node->child0);
  19.         freetree(node->child1);
  20.         free(node);
  21.     }
  22.  
  23. } /* freetree */
  24.